Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor changes for Batch #17 #4965

Closed
wants to merge 3 commits into from
Closed

Conversation

rohankatkar
Copy link
Contributor

Minor fix for Batch #17 (#4959)

@@ -214,7 +214,7 @@ public function run() {
* @return array
* (reference) of action links
*/
public function &links() {
static function &links() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do "public static function &links() {" ? The "public/private/protected" and "static" are independent of each other.

  • "public/private/protected" specifies visibility. PHP won't generate warnings if these are omitted, but phpcs will.
  • "static" indicates that the function will be called using class-notation. Old versions of PHP don't complain about this, but newer versions may complain with "Non-static method foo::bar() should not be called statically" if CRM_Contact_Page_View_UserDashBoard::links() calls a non-static function.

@yashodha yashodha added the 4.6 label Jan 17, 2015
@rohankatkar
Copy link
Contributor Author

closing this PR because of extra commit.
New PR sent at (#4972)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants